<?php
/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Game
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
?>

<?php if (count($this->scores)): ?>

  <ul class='game_profile_highscores'>
    <?php foreach ($this->scores as $score): ?>
      <?php $user = $score->getOwner(); if (!$user->getIdentity()) continue; ?>
      <li>
        <?php echo $this->htmlLink($user->getHref(), $this->itemPhoto($user, 'thumb.icon'), array('class'=>'game_highscore_member_thumb')); ?>
        <div class="game_highscore_member_info">
          <?php echo $this->htmlLink($user->getHref(), $user->getTitle(), array('class'=>'game_highscore_member_name'))?>
          <div class="game_highscore_member_meta">
            <?php if ($score->score_label): ?>
              <?php echo $this->translate($score->score_label);?>: <?php echo $this->locale()->toNumber($score->score); ?>
            <?php else: ?>
              <?php echo $this->translate(array('%s point','%s points',$score->score), $this->locale()->toNumber($score->score)); ?>
            <?php endif; ?>
            <br />
            <?php echo $this->timestamp($score->creation_date);?>
          </div>  
        </div>
      </li>
    <?php endforeach; ?>
  </ul>
<?php else: ?>
  <div class="tip">
    <span>
      <?php echo $this->translate('No scores have been submitted yet.');?>
    </span>
  </div>
<?php endif; ?>
